$(function () {
    $("#tou").load("tou.html");

    var id=getQueryString("id");
    $.ajax({
        url:"easybuy/selectNewsByID",
        data:{
            id:id
        },
        success:function (data) {
            $("#news").empty();
            $("#news").append("<tr>\n" +
                "              \t<td colspan=\"2\" style=\"text-align: center\">\n" +
                "                    <span style=\"color:#ff4e00; font-size:14px;\"><b>"+data.title+"</b></span>\n" +
                "                </td>\n" +
                "              </tr>\n" +
                "                <td class=\"tx_l\">创建时间</td>\n" +
                "                <td>"+data.createtime+"</td>\n" +
                "              </tr>\n" +
                "              <tr valign=\"top\">\n" +
                "                <td class=\"tx_l\">内容</td>\n" +
                "                <td>"+data.content+"</td>\n" +
                "              </tr>\n" +
                "              <tr height=\"70\">\n" +
                "                <td colspan=\"2\" align=\"center\">\n" +
                "                \t<input type=\"button\" value=\"返回\" class=\"btn_tj\" /> &nbsp; &nbsp; <!--<input type=\"reset\" value=\"重置表单\" class=\"btn_tj\" />-->\n" +
                "                </td>\n" +
                "              </tr>");

            $(".btn_tj").click(function () {
                window.history.go(-1);
            })
        }
    })
});
//取得地址栏参数
function getQueryString(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
    var r = window.location.search.substr(1).match(reg); //r是一个数组
    if (r != null) return unescape(r[2]); return null;
}